package nl.hanze.designpatterns.DAOFactory.impl;

import nl.hanze.designpatterns.DAO.LoginCredentialDAO;
import nl.hanze.designpatterns.DAO.impl.db.LoginCredentialDAOImpl;
import nl.hanze.designpatterns.DAOFactory.AbstractFactory;
import nl.hanze.designpatterns.domain.LoginCredential;

public class ConcreteFactoryDB implements AbstractFactory {
	
	public LoginCredentialDAO createLogin(String type){
		if(type=="db"){
			return new LoginCredentialDAOImpl();
		}
		return null;
	}

	@Override
	public boolean checkLogin(LoginCredential lc) {
		LoginCredentialDAOImpl lcdi = new LoginCredentialDAOImpl();
		return lcdi.isValid(lc);
	}
	
	
}
